import React from "react";

const Footer = (props: any) => {
  const { data } = props;

  const doneLength = data.filter((item: any) => item.done).length;
  const unDoneLength = data.filter((item: any) => !item.done).length;
  return (
    <div className="text-blue-500">
      <p>已完成： {doneLength}</p>
      <p>未完成： {unDoneLength}</p>
      <p>总数： {data.length}</p>
    </div>
  );
};

export default Footer;
